package com.project.nimsen.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 微信公众号信息,站点id生成url,站点id中的"-"替换为""然后取最后的32位为token
 * */
@Entity
@Table(name = "wxinfo")
public class Wxinfo implements Serializable {
	private static final long serialVersionUID = -3480392037566964038L;
	private String wxusername; // 微信名称
	private String wxoldid; //微信原始id
	private String weixinumber;//微信号
	private String siteid; // 站点编号同时也是他的token信息
	private String appid; // 微信公众号里的appid
	private String appsecret; // 微信公众号里的appsecret
	private String accesstoken; // 微信公众平台里的access_token信息
	private Date accesstokentime; // access_token的到期时间
	private String createUser; // 创建人
	private Date createTime; // 创建时间
	private Integer active; // 0表示正常，1表示删除
	private String id; // id

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "createUser")
	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	@Column(name = "createTime")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "active")
	public Integer getActive() {
		return active;
	}

	public void setActive(Integer active) {
		this.active = active;
	}
	@Column(name = "wxoldid")
	public String getWxoldid() {
		return wxoldid;
	}

	public void setWxoldid(String wxoldid) {
		this.wxoldid = wxoldid;
	}
	@Column(name = "weixinumber")
	public String getWeixinumber() {
		return weixinumber;
	}

	public void setWeixinumber(String weixinumber) {
		this.weixinumber = weixinumber;
	}

	@Column(name = "wxusername")
	public String getWxusername() {
		return wxusername;
	}

	public void setWxusername(String wxusername) {
		this.wxusername = wxusername;
	}
	@Column(name = "siteid")
	public String getSiteid() {
		return siteid;
	}

	public void setSiteid(String siteid) {
		this.siteid = siteid;
	}
	@Column(name = "appid")
	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}
	@Column(name = "appsecret")
	public String getAppsecret() {
		return appsecret;
	}

	public void setAppsecret(String appsecret) {
		this.appsecret = appsecret;
	}
	@Column(name = "accesstoken")
	public String getAccesstoken() {
		return accesstoken;
	}

	public void setAccesstoken(String accesstoken) {
		this.accesstoken = accesstoken;
	}
	@Column(name = "accesstokentime")
	public Date getAccesstokentime() {
		return accesstokentime;
	}

	public void setAccesstokentime(Date accesstokentime) {
		this.accesstokentime = accesstokentime;
	}
}
